package cn.tedu.homework2;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.testng.annotations.Test;

public class Test01 {
    @Test
    public void test04(){
        ApplicationContext ac=new ClassPathXmlApplicationContext("beans.xml");
        Context context=(Context)ac.getBean("context");
        System.out.println(context);
        ((ClassPathXmlApplicationContext)ac).close();
    }
}
